<?php
use think\facade\Route;
//注册路由
Route::post('register','api/User/register');
//登录
Route::post('login','api/User/login');
//发送验证码
Route::post('code','api/User/SmsCode');
//上传文件
Route::post('image','api/User/UploadImage');
//用户列表
Route::post('userlist','api/User/userlist');
//修改
Route::post('edit','api/User/edit');
//轮播图
Route::post('banner','api/Banner/banner');
//导航图
Route::post('banner','api/Nav/index');
//上传图片
Route::post('upload','api/User/upload');
//收货地址
//收获地址
Route::group('address',function (){
    Route::post('add','api/zhengmaotong/Address/addAddress');
    Route::post('edit','api/Address/editAddress');
    Route::get('getaddress','api/Address/getAddressList');
    Route::get('delAddress','api/Address/delAddress');
})->middleware(\api\zhengmaotong\middleware\CheckToken::class);
//充值路口
Route::group('wallet',function (){
    //增加余额
    Route::post('addmoney','api/zhengmaotong/wallet/money');
    //查看流水
    Route::post('check_money','api/zhengmaotong/wallet/moneyRecord');
})->middleware(\api\zhengmaotong\middleware\CheckToken::class);
//订单相关的
Route::group('money',function () {
    Route::post('addMoney', 'api/zhengmaotong/Wallet/addMoney');
    Route::post('moneyReport', 'api/zhengmaotong/Wallet/moneyReport');
});
// 支付
Route::group('order',function (){
    Route::post('index','api/zhengmaotong/Order/order');
    Route::post('pay','api/zhengmaotong/Pay/walletPay');
    Route::post('wuLiu','api/zhengmaotong/Order/wuLiu');
})->middleware(\api\zhengmaotong\middleware\CheckToken::class);